Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix max sizes in DmaDimConfig and refactor #982

Merged
merged 2 commits into from
Dec 11, 2024

Conversation

jtuyls
Copy link
Collaborator

@jtuyls jtuyls commented Dec 11, 2024

Some incorrect max size calculation in DmaDimConfig was blocking linear dimension folding and causing the following error when trying to increase the L1 matmul problem from 32x32x32 to 32x32x64 (MxNxK) for bf16:

<unknown>:0: error: 'aie.dma_bd' op Cannot give more than 3 dimensions for step sizes and wraps in this  tile (got 4 dimensions).

With this PR, that error should be resolved, but I am leaving the addition of that change to a separate PR. cc @yzhang93

return stepSizes;
}

SmallVector<int64_t> DmaDimConfig::getMaxStrides() const {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAICT the function getMaxStrides assumes nbInterStrides is 1, but getMaxSizes doesn't

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, thanks for the catch! This wasn't where the issue was (and we have only one inter dimension in all current devices and inter and intra stride are always the same), so I forgot to update it.

@jtuyls jtuyls force-pushed the fix-dma-dim-config branch from 838062a to ef92dce Compare December 11, 2024 17:06
Copy link
Contributor

@newling newling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

Copy link
Contributor

@yzhang93 yzhang93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing the issue.

@jtuyls jtuyls enabled auto-merge (squash) December 11, 2024 18:28
@jtuyls jtuyls merged commit 8ae709e into nod-ai:main Dec 11, 2024
7 checks passed
@jtuyls jtuyls deleted the fix-dma-dim-config branch December 11, 2024 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants